home *** CD-ROM | disk | FTP | other *** search
- Subject: Coercion Woes
- Sent: 6/24/96 12:09 AM
- Received: 6/24/96 8:25 AM
- From: Hutchings Software Development, hsd@earthlink.net
- Reply-To: ODF Interest, ODF-Interest@CILabs.ORG
- To: OpenDoc Development Framework Discussion List, ODF-Interest@CILabs.
-
- OK, so I installed my own coercion function using FW_CSemanticInterface.
- Then, within my code, I call:
-
- result_desc.CoerceInPlace(kClass_RIPoint);
-
- where result_desc is a FW_CDesc representing a perfectly good descriptor
- obtained from ::OSACoerceToDesc (I've walked through that code and know it
- works), and kClass_RIPoint is an AppleScript class defined in my 'aete'.
-
- Problem is, my coercion handler does not get called. So, I stepped through
- the debug version of OpenDoc 1.0.4 into
- ODMessageInterface::HandleAllCoercionsAux, where I found the line:
-
- ODPart* contextPart = _fNameResolver->GetCurrentContextPart(ev);
-
- And sure enough, context_part == kODNULL after stepping over it.
- Unfortunately, there are no public methods for setting the current context
- part.
-
-
- So, I guess there are two problems/questions here...
-
- (1) Should OpenDoc provide support for parts which want to use the
- Apple Event Manager to do coersions when the part is not involved
- in OSL protocol?
-
- (2) With ODF, should FW_CDesc::CoerceInPlace optionally take a
- FW_CSemanticInterface parameter so in-part coercions can be
- dispatched directly? Or should I just be calling my coercion
- proc directly (which actually looks like a good idea now that
- I've typed up my problem!)?
-
- Thanks,
-
- Brad
-
-
-
-
- Richard B. "Brad" Hutchings
- General Partner,
- Hutchings Software Development
-
- hsd@earthlink.net
-